﻿using System;
using YunZuan.Models.Entities;

namespace YunZuan.Models
{
    public class Inventory 
    {
       
        public int Tag { get; set; } //tinyint(1) NOT NULL DEFAULT '0' COMMENT '标签',

        #region 公共属性 
        public long? ID { get; set; }

        /// <summary>
        /// 供应商代码
        /// </summary>
        public string Supplier { get; set; }

        /// <summary>
        /// 供货地点
        /// </summary>
        public string Place { get; set; }

        public string SN { get; set; }

        /// <summary>
        /// 源货号
        /// </summary>
        public string OriginSN { get; set; }

        /// <summary>
        /// 形状：1.圆形，2.梨形，3.心形...
        /// </summary>
        public int Shape { get; set; }

        public decimal? Weight { get; set; }

        public string Color { get; set; }

        public string Clarity { get; set; }

        public string Cut { get; set; }

        /// <summary>
        /// 抛光
        /// </summary>
        public string Polish { get; set; }

        /// <summary>
        /// 对称
        /// </summary>
        public string Symmetry { get; set; }

        /// <summary>
        /// 对称
        /// </summary>
        public string Fluorescence { get; set; }


        /// <summary>
        /// 证书类型
        /// </summary>
        public string CertType { get; set; }

        /// <summary>
        /// 证书类型
        /// </summary>
        public string CertNo { get; set; }

        /// <summary>
        /// 台面羽状：None, fe, fe1, fe2, fe3
        /// </summary>
        public string Comments { get; set; }

        /// <summary>
        /// 奶色
        /// </summary>
        public string Milky { get; set; }


        /// <summary>
        /// OnShelves 上下架状态
        /// </summary>
        public int? OnShelves { get; set; }
        /// <summary>
        /// 彩钻 0.否,1.是
        /// /// 
        /// </summary>
        public short IsFancy { get; set; }

        /// <summary>
        /// PurchaseDiscountReturn 采购退点
        /// </summary>
        public decimal? PurchaseDiscountReturn { get; set; }

        /// <summary>
        /// PurchaseUSDPerCarat 采购每卡价
        /// </summary>
        public decimal? PurchaseUSDPerCarat { get; set; }

        /// <summary>
        /// PurchaseUSDPerGrain 采购总价
        /// </summary>
        public decimal? PurchaseUSDPerGrain { get; set; }


        /// <summary>
        /// PurchaseRMB
        /// </summary>
        public decimal? PurchaseRMB { get; set; }

        /// <summary>
        /// PurchaseExchange
        /// </summary>
        public decimal? PurchaseExchange { get; set; }

        /// <summary>
        /// PurchaseSupplier
        /// </summary>
        public string PurchaseSupplier { get; set; }





        public DateTime InsertTime { get; set; }

        public DateTime UpdateTime { get; set; }

        #endregion

        /// <summary>
        /// MeasurementMin
        /// </summary>
        public string MeasurementMin { get; set; }

        /// <summary>
        /// MeasurementMax
        /// </summary>
        public string MeasurementMax { get; set; }

        /// <summary>
        /// MeasurementHeight
        /// </summary>
        public string MeasurementHeight { get; set; }

        /// <summary>
        /// Measurement
        /// </summary>
        public string Measurement { get; set; }

        /// <summary>
        /// HA
        /// </summary>
        public string HA { get; set; }

        /// <summary>
        /// Hue
        /// </summary>
        public string Hue { get; set; }


        /// <summary>
        /// BlackDefect
        /// </summary>
        public string BlackDefect { get; set; }

        /// <summary>
        /// OtherDefect
        /// </summary>
        public string OtherDefect { get; set; }

        /// <summary>
        /// 肉眼
        /// </summary>
        public string EyeClean { get; set; }



        public decimal? Rapnet { get; set; }



        /// <summary>
        /// 数据状态：0.已删除, 1.正常, 2.订单中, 3.已售出
        /// </summary>
        public int? Status { get; set; }
        /// <summary>
        /// 付款状态：0未付 1，已付
        /// </summary>
        public int? ReceiptStatus { get; set; }

        private DateTime? _purchaseTime;
        public DateTime? PurchaseTime
        {
            get{ 
                if (_purchaseTime != null && Convert.ToDateTime(_purchaseTime.ToString()).Year > 1970)
                    return _purchaseTime;
                else
                    return null;
            }
            set { _purchaseTime = value; }          
        } 

        public DateTime? ShipTime { get; set; }

        public decimal? OriginUSDPerGrain { get; set; }
        public string SecondSN { get; set; }

        public decimal? OriginDiscountReturn { get; set; }
        public decimal? OriginUSDPerCarat { get; set; }
        public string PurchaseAgent { get; set; }
        private DateTime? _arrivalTime;
        public DateTime? ArrivalTime
        {
            get
            {
                if (_arrivalTime != null && Convert.ToDateTime(_arrivalTime.ToString()).Year > 1970)
                    return _arrivalTime;
                else
                    return null;
            }
            set
            {
                _arrivalTime = value ;
            }
        }

        public string ShortName { get; set; }
    }
}
